#ifndef TRACE_RECOGNITION_H
#define TRACE_RECOGNITION_H

#include <vector>

#include "cursor.h"
#include "trace.h"
#include "sketch.h"

class TraceRecognition{
    protected:
        map<int, Trace> traces;
        
        Sketch *sketch;
    public:
        TraceRecognition(){}
        ~TraceRecognition(){}
        
        virtual void createTrace(int _id){}
        virtual void addCursor(){}
        
        void addTrace(Trace &t){
            traces[t.getId()] = t;
        }
        
        virtual void finishTrace(int _id){}        

        void eraseTrace(int _id){
            traces.erase(_id);
        }
        
        virtual void recognizeTrace(int _id){}
        virtual void recognizeTraces(){}
        
        void composeSketch(int _id){
            sketch->addTrace( traces[_id] );
        }        
};

#endif /* TRACE_RECOGNITION_H */
